/* h5发布设置
 * H5PublicSet.js
 */
import {REQUEST_URL} from './Constants';
import {postFormData,getData,uploadFiles} from './HttpUtil';

export function getH5PublicInfo(params={}){
	return getData(REQUEST_URL.H5_GET_PUBLIC_DATA,params)
	.then(res=>{
		return res.data;
	},err=>{
		console.log('api get h5 public set data error');
		console.log(err);
	});
}

export function publicH5(params){
	return postFormData(REQUEST_URL.H5_PUBLIC,params)
	.then(res=>{
		return res;
	},err=>{
		console.log('api public h5 error');
		console.log(err);
	});
}

export function offlineH5(params){
	return postFormData(REQUEST_URL.H5_OFFLINE,params)
	.then(res=>{
		return res;
	},err=>{
		console.log('api offline h5 error');
		console.log(err);
	});
}

export function setModal(params){
	return postFormData(REQUEST_URL.H5_SET_MODAL,params)
	.then(res=>{
		return res;
	},err=>{
		console.log('api offline h5 error');
		console.log(err);
	});
}

export function deleteModal(params){
	return postFormData(REQUEST_URL.H5_DELETE_MODAL,params)
	.then(res=>{
		return res;
	},err=>{
		console.log('api offline h5 error');
		console.log(err);
	});
}